#include "Type.h"

namespace MiniWindow
{
	Type::Type(const String& fullName)
	{
		int spaceindex = fullName.LastIndexOf(TEXT("::"));
		if (spaceindex < 0)
		{
			this->name = fullName;
		}
		else
		{
			this->name = fullName.Substring(spaceindex + 2);
		}
		this->fullName = fullName;
	}
	const String& Type::Name() const
	{
		return this->name;
	}
	const String& Type::FullName() const
	{
		return this->fullName;
	}

	bool Type::operator==(const Type& type) const
	{
		return (this->fullName == type.fullName);
	}
	bool Type::operator!=(const Type& type) const
	{
		return (this->fullName != type.fullName);
	}

}